Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new snap_getCurrencyRate RPC method #2763

Merged
merged 13 commits into from
Sep 27, 2024
Merged

Add new snap_getCurrencyRate RPC method #2763

merged 13 commits into from
Sep 27, 2024

Conversation

GuillaumeRx
Copy link
Contributor

@GuillaumeRx GuillaumeRx commented Sep 25, 2024

This PR adds a new permitted RPC method called snap_getCurrencyRate.

It takes a cryptocurrency symbol under the currency param. (We currently only support btc) and return a rate object if the rate is available.

Fixes: #2762

Copy link

codecov bot commented Sep 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.40%. Comparing base (63ea955) to head (44bdb0f).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2763      +/-   ##
==========================================
+ Coverage   94.38%   94.40%   +0.01%     
==========================================
  Files         478      480       +2     
  Lines       10213    10240      +27     
  Branches     1561     1563       +2     
==========================================
+ Hits         9640     9667      +27     
  Misses        573      573              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@GuillaumeRx GuillaumeRx changed the title Add new snap_getRate RPC method Add new snap_getCurrencyRate RPC method Sep 25, 2024
Mrtenz
Mrtenz previously approved these changes Sep 27, 2024
@GuillaumeRx GuillaumeRx merged commit d4e1403 into main Sep 27, 2024
165 checks passed
@GuillaumeRx GuillaumeRx deleted the gr/get-rate-method branch September 27, 2024 12:15
GuillaumeRx added a commit that referenced this pull request Oct 16, 2024
This adds the types for the `snap_getCurrencyRate` method in
`snaps-sdk`. It was forgotten in #2763
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Create snap_getRate RPC method
2 participants